<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <%@ include file="/sysoutUtil/inc.jsp" %>
    <title>企业列表</title>
</head>
<body>
<table class="table" id="workorder-table" border="1"></table>
<script>
    $.ajax({
        url:'http://localhost:8071/WorkOrder/SelectWorkOrder',
        type:'get',
        dataType:'json',
        success:function(data){
            var str=""
            var Status = "";
            if(data.examStatus==1){
                Status="请求认证"
            }else if(data.examStatus==2){
                Status="认证通过"
            }else{
                Status="认证通过"
            }
            var str ='<tr>\n' +
                '<td>流水号</td>\n' +
                '<td>认证方式</td>\n' +
                '<td>操作时间</td>\n' +
                '<td>认证状态</td>\n' +
                '<td>员工姓名</td>\n' +
                '<td>用户</td>\n' +
                '</td>\n' +
                '</tr>'
            for ( var i = 0; i < data.length; i++) {
                str+=
                    '<tr>\n' +
                    '<td>'+data[i].workOder_no+'</td>\n' +
                    '<td>'+data[i].workOder_dic+'</td>\n' +
                    '<td>'+data[i].workOder_time+'</td>\n' +
                    '<td>'+Status+'</td>\n' +
                    '<td>'+data[i].employee_name+'</td>\n' +
                    '<td>'+data[i].user_name+'</td>\n' +
                '</td>\n'+
                '</tr>'
            }
            $("#workorder-table").html(str)

        }
    })
</script>

</body>
</html>
